package com.view.commonView;

import java.io.File;

import javax.swing.ImageIcon;
import javax.swing.JMenu;

/**
 * @author Diego Iacono
 * 
 */
public class CustomJMenu extends JMenu
{

   public CustomJMenu(String iconName)
   {
      ImageIcon imagenIcon = new ImageIcon(loadPath() + iconName);
      this.setIcon(imagenIcon);
   }

   private String loadPath()
   {
      File currentDir = new File("");
      String pathStr = currentDir.getAbsolutePath() + "\\icon\\";
      return pathStr;
   }
}
